<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="net.groupme.gui.constants.VIEW_VOCABULARY"%>
<%@page import="net.groupme.api.API_CONSTANTS"%>
<%@page import="net.groupme.gui.rendering.constants.RENDERING_CONSTANTS"%>
<%@page import="net.groupme.model.MODEL_CONSTANTS"%><html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<!-- meta tags, link to css:  -->
	<%@ include file="./jsp-includes/mymetaheader.jsp" %>

	<meta name="keywords" content="<c:out value='${taglistAsString}'></c:out>"/>
	<meta name="description" content="<c:out value='${descriptionString}'></c:out>"/>
	<c:forEach items="${groupManager.group.resources}" var="res" varStatus="status">
		<meta name="DC.relation" content="<c:out value='${res.URL}'/>"/>
	</c:forEach>
   
	
	<title><c:out value="${groupManager.group.name}" ></c:out>  [GroupMe! group]</title>
	
	<!--  Ajax Scripts -->
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRSearchManager.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRGroupManager.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRUserManager.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRResourceAggregation.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRSearchResultRenderer.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRResourceRenderer.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/interface/DWRGroupBrowsingManager.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%= request.getContextPath()%>/dwr/util.js'> </script>
	<script src="<%= request.getContextPath()%>/scriptaculous/prototype.js" type="text/javascript"></script>
	<script src="<%= request.getContextPath()%>/scriptaculous/scriptaculous.js" type="text/javascript"></script>

	<script type="text/javascript" src="<%= request.getContextPath()%>/highslide/highslide.js"></script>
	<script type="text/javascript">  <!--  
	    hs.graphicsDir = '<%= request.getContextPath()%>/highslide/graphics/';
	    hs.outlineType = 'rounded-white';
	    hs.outlineWhileAnimating = true;
	    //-->
	</script>
	
	<script type="text/javascript" src="<%= request.getContextPath()%>/groupme_js/groupme_groupview.js"></script>
	<%@ include file="./jsp-includes/groupResourceLoadingRendering.jsp" %>
	<%@ include file="./jsp-includes/resourceResizingMoving.jsp" %>
	<script type="text/javascript" language="javascript"><!--
	//<![CDATA[//>
		
		/** the Id of the group currently selected */
		var currentGroupId = 0;

   		//init stuff:		
		function init() {
			mousedown = 0;
			zAxisIndicator = 5;
			DWRUtil.useLoadingMessage();
			currentGroupId = <c:out value="${id}"/>;
			loadGroup();
		}
	//<!]]>
	//-->
	</script>
</head>
<body onload="init()" onmousemove="resize2(event);" onmouseup="resize3();">
	<!-- title image, logo:  -->
	<!-- title image, logo:  -->
	<div id="groupme_header">
		<%@ include file="./jsp-includes/groupme_header.jsp" %>
	</div>
	<!-- Menu: -->
	<div id="menu">
		<%@ include file="./jsp-includes/groupme_menu.jsp" %>
	</div>
	<!-- content and sidebar -->
	<div id="main">
		<!-- Search Sidebar (aggregating new resources into GroupMe!) -->
		<!-- Content: -->
	
		<div id="groupContent">
				<div class="ro_w">
					<div class="lo_w">
						<div class="ru_w">
							<div class="lu_w">	
								<div id="titelAndButtons" style="height:37px; margin-left:5px; margin-right:10px; margin-bottom:10px;">
									<span id="nameOfGroup" style="float: left; font-size:1.5em; padding-top: 3px">${nameOfGroup}</span>
										<c:if test="${userManager.loggedIn}">
											<div id="addTagInputField">
												<input id="addTagToGroupField" class="inputField" type="text" name=addTagToGroup value="" size="18" maxlength=""/>
												<input id="addTagToGroupButton" class="inputFieldButton" type="submit" value="add Tag" onclick="addTagToGroup()"/>
											</div>
										</c:if>		 
			<div id="allButtons">
				<c:if test="${userManager.loggedIn}">
						<!--<a id="addTagButton" href="javascript:addTagToGroup()" target="" title="Add tag to actual GroupMe! Group">
							<img src="<%= request.getContextPath() %>/images/t-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
						</a>-->
						<c:choose>
							<c:when test="${groupManager.subscriberOfGroup}">
								<a id="subscribe" href="javascript:subscribeGroup('<c:out value="${id}"/>')" target="" title="Subscritbe to this GroupMe! Group" style="display:none;">
									<img src="<%= request.getContextPath() %>/images/s-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
								</a>
								<a id="unsubscribe" href="javascript:unsubscribeGroup('<c:out value="${id}"/>')" target="" title="Unsubscritbe from this GroupMe! Group">
									<img src="<%= request.getContextPath() %>/images/us-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
								</a>
							</c:when>
							<c:otherwise>
							<c:if test="${!groupManager.ownerOfGroup && !groupManager.editorOfGroup}">
								<a id="subscribe" href="javascript:subscribeGroup('<c:out value="${id}"/>')" target="" title="Subscritbe to this GroupMe! Group">
									<img src="<%= request.getContextPath() %>/images/s-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
								</a>
								<a id="unsubscribe" href="javascript:unsubscribeGroup('<c:out value="${id}"/>')" target="" title="Unsubscritbe from this GroupMe! Group"  style="display:none;">
									<img src="<%= request.getContextPath() %>/images/us-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
								</a>
							</c:if>
							</c:otherwise>
						</c:choose>
						<c:if test="${groupManager.ownerOfGroup || groupManager.editorOfGroup}">
							<a id="editGroup" href="<%= VIEW_VOCABULARY.RESTful_GROUP_URI_PATTERN %><c:out value="${id}"/><%= VIEW_VOCABULARY.RESTful_EDIT_PATTERN %>" target="" title="Edit your GroupMe! Group">
								<img src="<%= request.getContextPath() %>/images/e2-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
							</a>
						</c:if>
				</c:if>
				<a id="exportRDF" href="" target="GroupMe! RDF-Export" title="Export GroupMe! Group to RDF">
					<img src="<%= request.getContextPath() %>/images/rdf-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
				</a>
				<a id="exportRSS" href="" target="GroupMe! RSS-Export" title="Export GroupMe! Group to RSS">
					<img src="<%= request.getContextPath() %>/images/rss-48x48.gif" height="24px" width="24px" style="text-decoration:none;border:none;"/>
				</a>
			</div>	
			</div>
			</div>
			</div>
			</div>
			</div>
			
			<div id="mainGroupWindow">
				<div class="ro_w">
					<div class="lo_w">
						<div class="ru_w">
							<div class="lu_w">			
								<div id="group" style="top:0px; left:0px">
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			
			<div id="rightGroupSidebar">
				<div class="ro_w">
					<div class="lo_w">
						<div class="ru_w">
							<div class="lu_w">
									<%@ include file="./jsp-includes/sidebarGroup.jsp" %>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="footer">
		<%@ include file="./jsp-includes/footer.jsp" %>
	</div>
</body>
</html>